import * as React from 'react';
import classNames from 'classnames';

export interface DescriptionsItemProps {
	children?: React.ReactNode;
	className?: string;
	label?: string;
	title?: string;
}

const DescriptionsItem: React.FC<DescriptionsItemProps> = props => {
	const prefixCls = 'bh-descriptions-row';
	const {
		children,
		className,
		label,
		...restProps
	} = props;
	const classString = classNames(
		prefixCls,
		className,
	);
	return (
		<tr {...restProps} className={classString}>
		    <td className="bh-descriptions-item">
		        <div className="bh-descriptions-item-container">
		        	<span className="bh-descriptions-item-label">{label}</span>
		        	<span className="bh-descriptions-item-content">
		        		{children}
		        	</span>
		        </div>
		    </td>
		</tr>
	)
};


export default DescriptionsItem;